home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue37 / outlook / Example1 / HelloWorld1.dpr < prev    next >
Encoding:
Text File  |  1998-04-30  |  899 b   |  54 lines

  1. { simple exchange extension. Adds a menu separator
  2.   and a menu item }
  3.  
  4. library HelloWorld1;
  5.  
  6. uses
  7.   SysUtils,
  8.   Classes,
  9.   Dialogs,
  10.   ExchExt,
  11.   ComHelloWorld1 in 'ComHelloWorld1.pas';
  12.  
  13.  
  14.  
  15. { due to a Delphi bug, this doesn't work
  16. function ExchEntryPoint: IExchExt; cdecl;
  17. begin
  18.   try
  19.     Result := TExchExt.Create;
  20.   except
  21.     on E:Exception do  begin
  22.       ShowMessage('Could not install custom Exchange Extion: ' + E.Message);
  23.       Result := nil;
  24.     end;
  25.   end;
  26. end;
  27. }
  28.  
  29.  
  30.  
  31. function ExchEntryPoint: pointer; cdecl;
  32. var
  33.   ExchExt: IExchExt;
  34. begin
  35.   try
  36.     ExchExt := TExchExt.Create;
  37.     ExchExt._AddRef;
  38.     Result := pointer(ExchExt);
  39.   except
  40.     on E:Exception do  begin
  41.       ShowMessage('Could not install custom Exchange Extion: ' + E.Message);
  42.       Result := nil;
  43.     end;
  44.   end;
  45. end;
  46.  
  47.  
  48. exports
  49.   ExchEntryPoint index 1;
  50.  
  51.  
  52. begin
  53. end.
  54.